﻿using BE.Model;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Linq;
using System.Text;

namespace DAL
{
    class Jct_Dorms_DB : DbContext
    {
        public DbSet<Charge> Charges { get; set; }
        public DbSet<City> Cities { get; set; }
        public DbSet<Dorm> Dorms { get; set; }
        public DbSet<Placement> Placements { get; set; }
        public DbSet<Profession> Professions { get; set; }
        public DbSet<Program> Programs { get; set; }
        public DbSet<Room> Rooms { get; set; }
        public DbSet<Student> Students { get; set; }
        public DbSet<User> Users { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<OneToManyCascadeDeleteConvention>();
            modelBuilder.Conventions.Remove<ManyToManyCascadeDeleteConvention>();
        }

        
    }
}
